package top.xierongsheng.user.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.xierongsheng.user.dao.GoodsMapper;
import top.xierongsheng.user.model.Goods;
import top.xierongsheng.user.service.IGoodsService;

import java.util.HashMap;

/**
 * 商品表 服务类实现接口
 *
 * @auther 谢荣生
 * @datetime 2020/12/30 17:11
 */
@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements IGoodsService {

    @Autowired(required = false)
    private GoodsMapper goodsMapper;

    /**
     * 分页获取商品列表
     * @param page
     * @param startDate
     * @param endDate
     * @param type
     * @param status
     * @param key
     * @return
     * @auther 谢荣生
     * @datetime 2021/1/4 14:06
     */
    @Override
    public IPage<HashMap> getGoodsListPage(Page<?> page, String startDate, String endDate, String  type, Integer status, String key) {
        return goodsMapper.getGoodsListPage(page, startDate, endDate, type, status, key);
    }
}
